The DeFi Dilemma

Joint Research Center - European Commission

Aron Bodisz

University of Vienna and Vienna Graduate School of Finance (VGSF)

Nikolaus Hautsch

Department of Statistics and Operations Research, Research Platform Data Science, University of Vienna, Vienna Graduate School of Finance (VGSF) and Center for Financial Studies (CFS)

Stefan Voigt

University of Copenhagen and Danish Finance Institute (DFI)

February 20, 2025

Blockchain renders intermediaries obsolete

  • A blockchain records transactions by an open network without centralized control
  • Instead: consensus protocol incentivizes validators to behave trustworthy (Saleh 2020; Biais et al. 2021)

What are the economic limits of blockchain-based settlement?

Fundamental blockchain building blocks

Pre-trade transparency

  • Transactions waiting for validation are held in a mempool, open for network participants to retrieve information on pending activity
  • Achieving consensus requires sufficient distribution of information for verification (Cong and He 2019)

Transaction fees

This paper: The DeFi Dilemma

Transparency and transaction fees imply economic limits to DeFi applications

  • If a transaction reveal public rents, transaction fees should be equal to the rent
  • Participants become indifferent between staying idle and exploiting inefficiencies
  • cross-DEX arbitrage transactions and liquidations are particularly relevant examples
  • Blockchain-based settlement harms price informativeness in the spirit of Grossman and Stiglitz (1980)

Solution: Undermine the DeFi ideal!?

  1. Limited transparency (Dark pools) requires trusted central authority
  2. Altering transaction fees to reduce the incentive for front-running requires trusted validators (private blockchain) or regulation (Auer 2019)

Implications for cross-DEX arbitrage: replace atomic swaps with costly alternatives

  1. Arbitrage through (trusted) dark pools (substantial rent extraction) (Lehar and Parlour 2023)
  2. Order-splitting (entails execution risk) (Heimbach, Pahari, and Schertenleib 2024)
  3. DEX-CEX arbitrage (entails settlement latency and counterpart risk) (Hautsch, Scheuch, and Voigt 2024)

Empirical results in a nutshell

Front-running risk is relevant friction

  1. Front-running risk renders cross-DEX arbitrage unprofitable
    • Significant price differences across DEXs
    • Transaction fees, trading costs, and liquidity cannot explain violations from the law of one price
    • ~10% of the documented price differences can be attributed to front-running risk
  1. Network participants exploit transparency of cross-DEX arbitrage trades
    • executed cross-DEX arbitrage transactions forego on average at least 64 percent of the arbitrage profits to validators
    • routing via dark pools even more expensive
  1. But: Markets do not come to a halt
    • Reintroduction of arbitrage costs (Gromb and Vayanos 2010)
    • Arbitrageurs turn towards statistical arbitrage (risky order splitting)
    • Substantial DEX-CEX arbitrage

DEXs and cross-DEX arbitrage

  • blockchain-based asset \(X\) traded against numéraire \(Y\) on a decentralized exchange (DEX)
  • DEXs work as a constant product market maker (CPMM) with pool size \(k_i\) and trading fees \(\tau_i\)
  • token holders can contribute pairs \((x_i,y_i)\) of tokens
  • To remove one type of token from the pool, a liquidity demander has to deposit the other type of token.
    1. Token \(X\) amount \(x_i\) \(\times\) numéraire amount \(y_i\) = \(x_i \times y_i = k_i\)
    2. The exchange of \(\Delta x_i\) tokens for \(\Delta y_i\) works such that \[\begin{align*}\underbrace{x_iy_i}_{\text{Before trading}} = \underbrace{\Big(x_i+(1-\tau_i) \Delta x_i\Big) \Big(y_i-\Delta y_i \Big)}_{\text{After trading}} = k_i\end{align*}\]
    3. The marginal price \(p_i\) of \(X\) in terms of numéraire is \(x_i/y_i\)

Cross-DEX arbitrage

  • Given two CPMMs (\(b\) and \(s\)) with \(p_s = \frac{y_s}{x_s} > \frac{y_b}{x_b} = p_b\), the arbitrageur exchanges \(\Delta y_{init}\) numéraire tokens for \(\Delta x\) tokens in pool \(b\): \[\begin{align} \Delta x = \frac{(1-\tau_b) x_b \Delta y_{init}}{y_b + (1-\tau_b) \Delta y_{init}} \end{align}\]
  • exchange \(\Delta x\) tokens for \(\Delta y_{final}\) numéraire tokens in pool \(s\): \[\begin{align} \Delta y_{final} = \frac{(1-\tau_s) y_s \Delta x}{x_s + (1-\tau_s) \Delta x} \end{align}\]
  • maximize gross profit by choosing \(\Delta y_{init}\) \(\Delta y_{final} - \Delta y_{init} = \underbrace{\frac{(1-\tau_b) (1-\tau_s) \Delta y_{init} x_s y_b }{x_b y_s + (1-\tau_s) \Delta y_{init} \big(x_b + (1-\tau_b) x_s \big)}}_{\Delta y_{final}}- \Delta y_{init}\)

The decision problem of the cross-DEX arbitrageur

  1. Arbitrageur monitors the state of the blockchain
  2. Continuously calculates potential cross-DEX arbitrage profits
  3. Choose profit-maximizing amount of tokens \(\Delta y^*_{init}\) to trade with given the liquidity \((k_b, k_s)\) and trading fees \((\tau_b, \tau_s)\)
  4. Choose transaction fee (\(f^*\)) to guarantee execution in the next block

Optimal transaction fee \(f^*\) varies substantially

  • No time priority. Ordering of transactions in the block is at the discretion of the validator
  • arbitrageur has a demand for immediacy because executed transactions modify the state of the DEXs (thus the price \(x_i/y_i\) or the size \(k_i\) of the pools)
  • Attaching transaction fees yields immediacy on the blockchain
  • Arbitrage transaction worthwhile if net profits \(>0\) (absent frontrunning risk)

Transaction fees required for a two-legged arbitrage (one-day moving average). The figure presents the one-day moving average of optimal transaction fees of a two-legged arbitrage transaction, that predicts a place in the queue at positions: \(q_n=25\) (before the 25th), \(q_n=10\) (before the 10th) and \(q_n=1\) (the first position).

We determine the entire arbitrage costs

  • Smart contracts are self-enforcing based on the state of the blockchain (Cong and He 2019)
  • Smart contracts render DEXs pure matchmakers

Virtues of smart-contract transaction execution

  • Unconstrained arbitrage capital (Gromb and Vayanos 2010): flash loans allow anyone to borrow and repay tokens within one transaction
  • No execution risk conditional on validation: both legs of the trades are executed simultaneously
  • Conditional transaction execution guarantees non-negative payouts (albeit at the cost of paying gas fees)

Costs of smart-contract transaction execution

  • (Small) transaction fees apply in the case of transaction failure (English-type auctions combined with a minimum bid)
  • Reversion fees are an inherent feature of blockchain security to avoid denial-of-service attacks

Cross-DEX arbitrage with front-running risk?

What to do?

  • Bid the value of the arbitrage profit (scaring off front-runners) and earn \(0\) net profit (optimal strategy) Daniel and Hirshleifer (2018)

  • Deviate and bid a lower transaction fee in hopes of a positive profit. If front-run she earns a \(0\) gross profit and pays a reversion fee \(r>0\), yielding an expected loss

Granular dataset on DEXs and transaction fees

  • Data on DEXs from Dune Analytics covers the period from December 7, 2020, to November 1, 2024
  • DEXs that use (1) CPMMs and (2) account for 80-85% of the trading volume on the Ethereum blockchain at the beginning of the sample period: Uniswap V2, Sushiswap, and Shibaswap
  • Arbitrage across the economically most significant pools that trade the token pairs: WETH-USDC, WETH-USDT, WETH-DAI, and WETH-WBTC
  • Transaction fee is chosen based on where it would place the transaction in the queue of the next block: 1st, < 10th, or the < 25th in the queue
  • We report average price improvement as the average mid-price differences closed by arbitrage transactions

10% of price differences could be closed

Average price improvements and the arbitrageur’s share from the price improvement (measured in percentage points). Average price improvement reports the average of the mid-price differences closed by arbitrage transactions across pool pairs in percentage points. Average arbitrageur’s share from price improvement columns report the share of the price improvement that generated a positive net profit for the arbitrageur (while the rest accrued to the validator in the form of transaction fees). The parentheses under the column names contain the fee levels corresponding to the ‘target’ positions. Share of blocks with positive effective price differences presents the percentage of blocks that contain a positive price difference.

Identifying arbitrage transactions

  • We use the granular Flashbots MEV dataset to identify executed cross-DEX arbitrage transactions
  • Among others, we extract
    • gross arbitrage profits
    • transaction fees/and direct payments (for dark pool transactions) to the validators
  • We filter for atomic arbitrage transactions that have only two legs

Example transaction: 0xda2a6ee916834c0dfb7c23cedc5468224400f16ee9160b5b8d13f582e92ad97c. Two-leg arbitrage with net profit of 0.9053 ETH - 0.1055 ETH (gas used) - 0.6912 ETH (transaction fee) = 0.1087 ETH = 212.27 USD

Arbitrage opportunities do not get exploited

Hypothetical and actual arbitrage profits (in million USD). Cumulative net profit from actual arbitrage transactions reports the net profit earned from actual arbitrage in USD. Cumulative payments to validators presents the USD value of the payments received by validators either in the form of fees or direct payments. Cumulative net profit from hypothetical arbitrage transactions columns report the net profit, in USD, that arbitrageurs could have hypothetically earned at the three transaction fee levels in a front-running risk-free market. The parentheses in columns four to six indicate the percentage of the actual net arbitrage profit foregone at various transaction fee levels.

Do markets come to a halt? Not, if unilateral censorship is allowed

  • Submitting arbitrage transactions through private pools (e.g. MEV-Boost, Flashbots Relay) \(\Rightarrow\) DeFi settlement, but transactions are received and handled by a centralized intermediary
  • No pre-trade transparency (excl. validator) and no reversion fee
  • Private pool transaction data from the largest providers (Flahbots, Eden Network)
  • Validators demand an even higher share of the rent: \(58\% \nearrow 69\%\)

Do markets come to a halt? Not, if a custodian controls the assets

  • Performing statistical arbitrage between DEX and CEX instead of atomic arbitrage \(\Rightarrow\) Interaction with a custodial centralized intermediary
  • Reintroduction of arbitrage costs
    • The arbitrage transaction is not atomic \(\Rightarrow\) execution risk
    • Flashloans cannot be leveraged \(\Rightarrow\) capital constraints
    • Using heuristics similar to Heimbach, Pahari, and Schertenleib (2024) we find several potential “legs” of statistical arbitrages
Summary statistics on cross-DEX and DEX-CEX arbitrages (from 2023 August 8th until 2024 October 1st).
Cross-DEX Arbitrage DEX-CEX Arbitrage
Number of transactions 144 24,881
Cumulative gross profit (thousand USD) 86.5 1,503.9
Average gross profit (USD) 601 60
Std. dev. of gross profit (USD) 2,145 767

This paper questions whether DeFi can sustain itself

  • Combining two fundamental pillars of blockchain-based settlement – pre-trade transparency and transaction fees renders front-running feasible
  • market failure because it is not worthwhile to act on informational advantages
  • We provide evidence for this pattern: price differences remain large, unexploited by arbitrageurs due to front-running risks

The DeFi dilemma

  • The only way to overcome pre-trade transparency and transaction fees is by undermining the DeFi ideal of rendering trusted intermediaries obsolete
  • front-running risk renders DeFi applications inefficient without trusted intermediation.
  • Only reinstalling trusted third parties mitigates the problem entirely

References

Auer, Raphael. 2019. Embedded supervision: how to build regulation into decentralised finance .” BIS Working Paper.
Biais, Bruno, Christophe Bisiere, Matthieu Bouvard, and Catherine Casamatta. 2021. The Blockchain Folk Theorem.” Review of Financial Studies 32 (5): 1662–1715. https://doi.org/https://doi.org/10.1093/rfs/hhy095.
Budish, Eric. 2024. “Trust at Scale: The Economic Limits of Cryptocurrencies and Blockchains*.” The Quarterly Journal of Economics 140 (1): 1–62. https://doi.org/10.1093/qje/qjae033.
Capponi, Agostino, and Ruizhe Jia. 2023. “Liquidity Provision on Blockchain-Based Decentralized Exchanges.”
Chiu, Jonathan, and Thorsten V. Koeppl. 2019. Blockchain-Based Settlement for Asset Trading.” Review of Financial Studies 32 (5): 1716–53. https://doi.org/https://doi.org/10.1093/rfs/hhy122.
Cong, Lin William, and Zhiguo He. 2019. Blockchain Disruption and Smart Contracts.” Review of Financial Studies 32 (5): 1754–97. https://doi.org/https://doi.org/10.1093/rfs/hhz007.
Daniel, Kent D, and David Hirshleifer. 2018. “A Theory of Costly Sequential Bidding.” Review of Finance 22 (5): 1631–65. https://doi.org/https://doi.org/10.1093/rof/rfy009.
Easley, David, Maureen O’Hara, and Soumya Basu. 2019. From Mining to Markets: The Evolution of Bitcoin Transaction Fees.” Journal of Financial Economics 134 (1): 91–109. https://doi.org/https://doi.org/10.1016/j.jfineco.2019.03.004.
Easley, Robert F., and Rafael Tenorio. 2004. Jump bidding strategies in internet auctions.” Management Science 50 (10): 1407–19. https://doi.org/https://www.jstor.org/stable/30046183.
Gromb, Denis, and Dimitri Vayanos. 2010. Limits of Arbitrage.” Annual Reviews of Financial Economics 2 (1): 251–75. https://doi.org/https://doi.org/10.1146/annurev-financial-073009-104107.
Grossman, Sanford J, and Joseph E Stiglitz. 1980. “On the Impossibility of Informationally Efficient Markets.” The American Economic Review 70 (3): 393–408. https://doi.org/https://www.jstor.org/stable/1805228.
Hautsch, Nikolaus, Christoph Scheuch, and Stefan Voigt. 2024. Building trust takes time: Limits to arbitrage for blockchain-based assets.” Review of Finance 28 (4): 1345–81. https://doi.org/10.1093/rof/rfae004.
Heimbach, Lioba, Vabuk Pahari, and Eric Schertenleib. 2024. “Non-Atomic Arbitrage in Decentralized Finance.” https://arxiv.org/abs/2401.01622.
Hinzen, Franz J., Kose John, and Fahad Saleh. 2022. Bitcoin’s Limited Adoption Problem.” Journal of Financial Economics 144 (2): 347–69. https://doi.org/https://doi.org/10.1016/j.jfineco.2022.01.003.
Lehar, Alfred, and Christine A Parlour. 2022. Miner Collusion and the BitCoin Protocol Working paper.
Lehar, Alfred, and Christine A. Parlour. 2023. “Battle of the Bots: Flash Loans, Miner Extractable Value and Efficient Settlement” Working paper. https://doi.org/10.2139/ssrn.4382292.
Park, Andreas. 2023. Conceptual Flaws of Decentralized Automated Market Making.” Management Science (Forthcoming).
Saleh, Fahad. 2020. Blockchain Without Waste: Proof-of-Stake.” The Review of Financial Studies 34 (3): 1156–90. https://doi.org/10.1093/rfs/hhaa075.